Skip to content

feat(session): branch from earlier user prompts - #115

Open
danielkov wants to merge 5 commits into
feat/transcript-navigationfrom
feat/transcript-prompt-branches
Open

feat(session): branch from earlier user prompts#115
danielkov wants to merge 5 commits into
feat/transcript-navigationfrom
feat/transcript-prompt-branches

Conversation

@danielkov

Copy link
Copy Markdown
Contributor

Summary

Add /branch to edit an earlier text prompt into a new session while preserving the original conversation. Checkout remains provisional until submission, and Escape restores the parked source view and draft.

Motivation

Builds on the read-only transcript navigator in #110 with non-destructive continuation from earlier user prompts, including history retained before compaction.

Impact

Checkout requires settled source work and supports text-only prompts. It changes conversation context only: files, running processes, and external effects are not rolled back.

Technical details

Authoritative historical boundaries

Kit-specific ACP v2 list, prepare, and submit requests validate opaque addresses against source history and configuration. The child receives the exact prefix before the selected prompt, never a later summary substituted for missing context.

Durable, retry-safe creation

Versioned bootstrap metadata records lineage, submitted-request identity, and model configuration without changing the outer transcript format. A complete replacement record and branch-scoped disk barrier establish commit; retries recover the same child without duplicating the prompt or model execution.

Provisional client state

The TUI parks the source transcript, editor, and attachments, guards asynchronous results by activation epochs, and routes child replay before execution. The preserved source remains available through /sessions.

@danielkov
danielkov force-pushed the feat/transcript-navigation branch 2 times, most recently from b09a058 to 210e33b Compare September 6, 2026 09:28
Retire the attachment when a started model-switch compaction is cancelled with unconsumed input, matching prompt and autonomous turn cleanup. Keep noncompacting and noncancelled paths unchanged.\n\nExercise the real actor with diagnostic-pipe backpressure after marker submission and before its first step. Verify queued prompt and MCP wake disposal, unchanged model and durable transcript, and passive reload.
@danielkov
danielkov force-pushed the feat/transcript-prompt-branches branch from 1bd6d92 to 78fe3e2 Compare September 6, 2026 10:07

@kit-code-agent kit-code-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cancellation can discard acknowledged steering input and remove an established session. Resume preflight also blocks recovery of intact legacy history when migration leaves an empty or torn first scoped record.

Comment thread src/protocols/acp/v2.rs Outdated
Comment thread src/session/branch.rs
Persist acknowledged steering through the normal transcript observer using a first-mutator execution fence. Keep the actor usable without executing cancelled model or compaction work, and retain pre-step original/synthetic-input retirement.

Cover ordinary, autonomous, initial-branch, and confirmed model-switch turns at real ACP receipt and notification boundaries; quarantine failed or aborted settlement.
Keep per-item successful notification acknowledgements across later boundary failures. Persist only the verified pending prefix through the execution fence, excluding unacknowledged input before any append and removing it before cancellation completes.

Retire failed attachments without automatically retrying the undelivered suffix. Cover real transport failure plus cancellation, multi-item and identical steers, append history, explicit reconnect retry, and settlement failure isolation.

@kit-code-agent kit-code-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found. The changes look good to merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant